package com.wz.project.bas.inoroutType.service.impl;

import com.wz.common.utils.text.Convert;
import com.wz.project.bas.inoroutType.domain.BasInOrOutType;
import com.wz.project.bas.inoroutType.mapper.BasInOrOutTypeMapper;
import com.wz.project.bas.inoroutType.service.IBasInOrOutTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 出入库类型Service业务层处理
 * 
 * @author wz
 * @date 2022-02-11
 */
@Service
public class BasInOrOutTypeServiceImpl implements IBasInOrOutTypeService
{
    @Autowired
    private BasInOrOutTypeMapper basInOrOutTypeMapper;

    /**
     * 查询出入库类型
     * 
     * @param id 出入库类型ID
     * @return 出入库类型
     */
    @Override
    public BasInOrOutType selectBasInOrOutTypeById(String id)
    {
        return basInOrOutTypeMapper.selectBasInOrOutTypeById(id);
    }

    /**
     * 查询出入库类型列表
     * 
     * @param basInOrOutType 出入库类型
     * @return 出入库类型
     */
    @Override
    public List<BasInOrOutType> selectBasInOrOutTypeList(BasInOrOutType basInOrOutType)
    {
        return basInOrOutTypeMapper.selectBasInOrOutTypeList(basInOrOutType);
    }

    /**
     * 新增出入库类型
     * 
     * @param basInOrOutType 出入库类型
     * @return 结果
     */
    @Override
    public int insertBasInOrOutType(BasInOrOutType basInOrOutType)
    {
        return basInOrOutTypeMapper.insertBasInOrOutType(basInOrOutType);
    }

    /**
     * 修改出入库类型
     * 
     * @param basInOrOutType 出入库类型
     * @return 结果
     */
    @Override
    public int updateBasInOrOutType(BasInOrOutType basInOrOutType)
    {
        return basInOrOutTypeMapper.updateBasInOrOutType(basInOrOutType);
    }

    /**
     * 删除出入库类型对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteBasInOrOutTypeByIds(String ids)
    {
        return basInOrOutTypeMapper.deleteBasInOrOutTypeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除出入库类型信息
     * 
     * @param id 出入库类型ID
     * @return 结果
     */
    @Override
    public int deleteBasInOrOutTypeById(String id)
    {
        return basInOrOutTypeMapper.deleteBasInOrOutTypeById(id);
    }
}
